<?php
/**
 * Author: zhangkang
 * Date: 2016/12/2910:44
 * Description:
 */
//header('Content-Type:text/html; charset=gb2312');//使用gb2312编码，使中文不会变成乱码

require 'common.inc.php';
set_cookie('mobile', 'pc', $DT_TIME + 30 * 86400);
$openid = decrypt(get_cookie('weixin_openid'), DT_KEY.'WXID');
log_write('openid =>:'.$openid);
$filtertender = $_POST['filtertender'];
if ( isset($filtertender) && !empty($filtertender) ) {
    if ( $filtertender == -1 ) {
        $filtertender = null;
    }
    $result = $db->query("UPDATE {$DT_PRE}weixin_user SET filtertender= '$filtertender' WHERE openid='$openid'");
}
//单独处理修改地区的跳转
if($xgdq){
$url ="/mobile/zbdy.php"; 
Header("Location:$url");
	}

echo $result;
exit;
//include template('weixinuser', 'mobile');
//if(DT_CHARSET != 'UTF-8') toutf8();
?>